let num = 0;
setInterval(function (){
    if(num===10) num = 0;
    ++num;
    document.getElementById("pic").src="pic/"+num+".png";
},1000);